Skip to content

Add CI that validates the devcontainer environment - #3

Open
jacobcow21 wants to merge 1 commit into
masterfrom
devcontainer-ci
Open

jacobcow21 wants to merge 1 commit into
masterfrom
devcontainer-ci

Conversation

@jacobcow21

@jacobcow21 jacobcow21 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Requested by Jacob · project thread

Fixes #4

Describe your change

Adds CI that validates the devcontainer environment.

  • Build .devcontainer/Dockerfile: a new dockerfile job builds the image and checks that python3, pre-commit, ruff and uv run inside it. The Dockerfile could not build before, because it copied a requirements.txt that the repo no longer has (dependencies live in pyproject.toml/uv.lock). It now uses the same base image as devcontainer.json and installs the same tools.
  • Check the initialization scripts: the devcontainer job builds the container from devcontainer.json with devcontainers/ci, which runs postCreateCommand (and so .devcontainer/post_install). It then verifies that the pre-commit hook is installed, both Oh My Zsh plugins were cloned, and ~/.zshrc enables them.
  • Workflow: also adds workflow_dispatch, read-only permissions, and limits push runs to master.

I tested both jobs' steps locally in Docker, and they passed.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues, then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

https://claude.ai/code/session_01K2qoKiPwvRQs4vZk9EAp7p


Generated by Claude Code

Build .devcontainer/Dockerfile and check its tools, and build the
devcontainer from devcontainer.json so post_install runs, then verify
the pre-commit hook and Oh My Zsh plugins it sets up. The Dockerfile no
longer copies requirements.txt, which the repo dropped for pyproject.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2qoKiPwvRQs4vZk9EAp7p

Copy link
Copy Markdown
Owner Author

build_docs is failing, but not because of this PR. The failing step is actions/configure-pages, which errors with "Get Pages site failed ... Not Found" because GitHub Pages isn't enabled on this fork. The PR doesn't touch the docs or sphinx.yml. To fix it, enable Pages with source "GitHub Actions" under Settings → Pages, then re-run the job. I can't change repository settings from here, so I haven't ported a fix into this PR.

Both new devcontainer jobs passed: Build .devcontainer/Dockerfile and Build devcontainer and run post_install.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a workflow CI to validate the Devcontainer environment

1 participant